# RUN: llc %s -mtriple=m68k -start-after=prologepilog -O0 -filetype=obj -o - \
# RUN:   | extract-section .text \
# RUN:   | FileCheck %s -check-prefixes=MOVM32MP,MOVM32MJ

#------------------------------------------------------------------------------
# MxMOVEM_RM is used to load a list of registers sequentially from a memory
# location
#------------------------------------------------------------------------------

--- # ARID
#               -------------------+---+-----------+---+-----------+-----------
#                F   E   D   C   B | A | 9   8   7 | 6 | 5   4   3 | 2   1   0
#               -------------------+---+-----------+---+-----------+-----------
#                0   1   0   0   1 | D | 0   0   1 | S |    MODE   |    REG
#               -------------------+---+-----------+---+-----------+-----------
#                                      REGISTER LIST MASK
#               ---------------------------------------------------------------
# MOVM32MP:      0   1   0   0   1   1   0   0 . 1   1   1   0   1   0   0   1
# MOVM32MP-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   0   1
# MOVM32MP-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   0   0
#               ---------------------------------------------------------------
# MOVM32MP-SAME: 0   1   0   0   1   1   0   0 . 1   1   1   0   1   0   0   1
# MOVM32MP-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   1   1
# MOVM32MP-SAME: 1   1   1   1   1   1   1   1 . 1   1   1   1   1   1   1   1
name: MxMOVEM_RM_ARID
body: |
  bb.0:
    MOVM32mp 1,  0, $a1
    MOVM32mp 3, -1, $a1

...
--- # ARI
#               -------------------+---+-----------+---+-----------+-----------
#                F   E   D   C   B | A | 9   8   7 | 6 | 5   4   3 | 2   1   0
#               -------------------+---+-----------+---+-----------+-----------
#                0   1   0   0   1 | D | 0   0   1 | S |    MODE   |    REG
#               -------------------+---+-----------+---+-----------+-----------
# MOVM32MJ-SAME: 0   1   0   0   1   1   0   0 . 1   1   0   1   0   0   0   1
# MOVM32MJ-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   0   1
#               ---------------------------------------------------------------
# MOVM32MJ-SAME: 0   1   0   0   1   1   0   0 . 1   1   0   1   0   0   0   1
# MOVM32MJ-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   1   1
#               ---------------------------------------------------------------
#                                      REGISTER LIST MASK
#               ---------------------------------------------------------------
name: MxMOVEM_RM_ARI
body: |
  bb.0:
    MOVM32mj 1, $a1
    MOVM32mj 3, $a1

...
